Authorware Article

Eye Candy for Authorware, Part 2: Integrating the Graphics

Amy Blankenship
Magnolia Multimedia

In part one of this two part article series, you built an interface intended to be integrated with Authorware. In part two, you’ll bring the graphics into Authorware. If you did not go through part one, download the finished graphics linked below. You can view the final interface that you will complete here.

This article assumes you are at least somewhat familiar with how to use Authorware, so I will not go into quite as much detail as I did in part one.

Requirements

To complete this tutorial you will need to install the following software and files:

Authorware 7


Download the finished graphics


To put the Interface into Authorware, you will be:

  • Setting Up the File Properties
  • Bringing in the basic graphic
  • Adding the Real buttons
  • Adding the Windows Control Treeview
  • Seting Up the "Crumb Trail"
  • Adding the Fake Buttons

Setting up the File Properties

  1. Create a new file in Authorware 7 and save it with a file name of your choice. Note that the over state for the translucent hot object buttons will not work the same in earlier versions of Authorware.
  2. Select Modify > File Properties from the main menu.
  3. Turn off the title and menu bars, and check the Center on Screen checkbox.
  4. Select the most pale gray swatch as a background color.
Setting the file properties

Figure 1. Setting the file properties

Bringing in the Basic Graphic

I love this part. This is where all the hard work starts to come together like magic. I like to have a single framework that controls the interface for the whole piece.

  1. Start out by dragging a Framework icon onto the flowline.

    Dragging a Framework icon onto the flowline

    Figure 2. Dragging a Framework icon onto the flowline

    My Framework has been customized so that the default navigation and gray navigation panel are gone, which is why mine appears grayed out.

  2. Open the Framework, and position the paste hand inside it.
  3. Press the "Import" button, or select File > Import.
  4. Navigate to your finished .png files and select your interface graphic.

    Browsing to the interface graphic

    Figure 3. Browsing to the interface graphic

  5. Run the file. You will notice that your graphic looks something like this:

    Viewing the interface

    Figure 4. Viewing the interface

    That doesn't look very good, does it?

  6. Double-click the graphic to edit its properties.
  7. Double-click the arrow in the tool palette to bring up the Modes Inspector.

    The arrow tool

    Figure 5. The arrow tool

    The Modes inspector

    Figure 6. The Modes inspector

  8. Click Alpha in the Modes inspector to change the mode of the graphic. Now, your graphic should look a bit more as intended.

    Changing the mode of the Graphic to alpha

    Figure 7. Changing the mode of the Graphic to alpha

The cutout rectangle in the lower left is where you will be putting the translucent hot object buttons. A bit of texture behind translucent objects makes them look even better, so next you will add subtle horizontal stripes to this area. Use the following steps to do this.

  1. Use the rectangle tool to draw a rectangle in this area. It does not have to be exact. In fact, it should overlap slightly.
  2. Double-click the rectangle tool to bring up the Fills inspector, and select the close horizontal line pattern.

    Selecting the close line horizontal pattern in the Fills inspector

    Figure 8. Selecting the close line horizontal pattern in the Fills inspector

    Selecting the close horizontal pattern in the Fills inspector

    Figure 9. Selecting the close horizontal pattern in the Fills inspector

  3. If the background color is not already set to white, set it to white now.
  4. Set the line style to None (the dotted line at the top of the Lines inspector).
  5. Set the Mode to Transparent. Your rectangle should now resemble the one in Figure 10 below.

    The rectangle with the Fill and Mode applied

    Figure 10. The rectangle with the Fill and Mode applied

  6. The black lines are a bit darker than the subtle effect you're after, so choose a grey that is just slightly darker than the background as shown in Figure 11 below.

    Altering the horizontal lines color

    Figure 11. Altering the horizontal lines color

    Once you've done that, your Authorware file should look like figure 12 below.

    The updated interface

    Figure 12. The updated interface

Now that your rectangle is the way you want it, send it behind the main interface graphic. You can use the Modify Menu or use the key combination Ctrl+Shift+Down Arrow to do this. Did I mention that the "Addendum" folder within the Authorware 6, 6.5 and 7 Help folder contains a printable reference to the shortcuts available in Authorware?

Once you've done that, your Authorware file should look something like figure 13 below.

Sending the rectangle behind the main interface graphic

Figure 13. Sending the rectangle behind the main interface graphic

Adding the Real Buttons

You'll recall that in part one, you exported two groups of buttons. One group you exported as BMP files, and the other you exported as PNG files. The BMP files were created with hard edges where they butted up against the background that was transparent in Fireworks. If you've taken a look at the exported version of those graphics, you'll see that the transparent background exported as white.

By default, when you import a graphic into the button editor, it imports as matted. The button editor cannot handle alpha transparency, which is why you did not export these buttons as PNG files.

Begin by setting up an interaction.

  1. Drag a map next to it, and select button for the response type.

    Dragging a map to the flowline and applying a button response type

    Figure 14. Dragging a map to the flowline and applying a button response type

  2. Add a second button response.
  3. Name your new buttons Menu and Help.

    Naming the buttons

    Figure 15. Naming the buttons

  4. You can access the Button Editor in one of two ways. One way is by selecting Window > Buttons. The other is through the Response Properties Dialog box of any button response. The latter is how you are going to do it, so you can create a new button and assign it at the same time.
  5. Double-click the Menu button response symbol to open the Response Properties dialog box.

    The Response Properties dialog box

    Figure 16. The Response Properties dialog box

  6. Now click the Buttons Button (no, there's not an echo in here). It's just beneath the picture of what your Menu button looks like right now.

    The Buttons dialog box

    Figure 17. The Buttons dialog box

  7. You need to create a new button, so click Add. This will bring up the Button Editor dialog box.

    The Button editor dialog box

    Figure 18. The Button editor dialog box

  8. Now, it's just a matter of importing the states. Click the Import button next to the Graphic drop-down menu.

    Importing the button state graphics

    Figure 19. Importing the button state graphics

  9. Navigate to your finished bitmaps, and find the graphic that you exported from the "up" state of your button. It should have the same file name, with a BMP extension.
  10. Click the Import button to import it.

    Setting the button state graphics in the button editor dialog box

    Figure 20. Setting the button state graphics in the button editor dialog box

  11. Add a description for your button. Then import the Down and Over states.

    Adding descriptions to the button

    Figure 21. Adding descriptions to the button

  12. For the Over state, you are going to add a label which will pop up when the cursor rolls over the button.
  13. With the Over state selected, choose "show label" from the Label drop-down menu.
  14. Drag the label over to appear below and to the right of the button.
  15. That dark color won't show up on the dark interface frame, so you need to change the color. Make sure the text is still selected, then select Window > Inspectors > Colors, or just use the Ctrl+K keyboard shortcut.

    Changing the color of the button description

    Figure 22. Changing the color of the button description

  16. This will open a Color Inspector like you use in Display Icons. Select a light color. I used white. If you want, you can set the checked state of the button to use the down graphic.
  17. Click OK to close the button editor and add your button.
  18. Click OK again at the Buttons window. This should bring you back to the Response Properties dialog box. You may find it convenient to change the cursor to a pointing hand before you close the dialog box.
  19. Click OK to close the dialog box and keep the changes.
  20. Using what you have just learned, repeat these steps to import the states of the Help button.

    Your Authorware file should look like figure 23 below.

    Applying the changes to the Help button

    Figure 23. Applying the changes to the Help button

  21. Align your buttons over the spaces made for them.

    Aligning the buttons in interface

    Figure 24. Aligning the buttons in interface

  22. Save your work and pat yourself on the back for getting this far.

Adding the Windows Control Treeview

Now you're going to set up a Call and Return subroutine for the TreeView control that will display the menu. The reason for this is that you want the Treeview to pop up when you click the button and to go away when you navigate to another page, click anywhere else, or make a selection from the menu. By using a Call and Return Subroutine, you get the pause so that the user can make a selection, but navigating away from the current page will also erase the control. Use the following steps to do this.

  1. Add a second Framework icon below the first, and add a Map to it to hold your subroutine.

    Adding a second Framework icon to the flowline and adding a Map icon to it to hold the subroutine

    Figure 25. Adding a second Framework icon to the flowline and adding a Map icon to it to hold the subroutine

  2. Inside your Menu button response map, add a Navigate icon set as a call and return to the Menu Subroutine. Optionally, you can add code to uncheck and recheck the Menu button.

    Adding a Navigation icon as a call and return to the Menu Subroutine

    Figure 26. Adding a Navigation icon as a call and return to the Menu Subroutine

  3. Add the code in figure 27 inside the Menu Subroutine to catch and react to the user's response.

    Adding code to the Menu Subroutine to catch and react tot eh user’s response

    Figure 27. Adding code to the Menu Subroutine to catch and react tot eh user’s response

I am not going to get too far into the specifics of the code in figure 27, because this tutorial is about how to integrate graphics into Authorware for best effect, not about coding subroutines. However, since the Treeview itself is a graphic element, the code that sets it up looks something like this:

The code that sets up the Treeview graphic element

Figure 28. The code that sets up the Treeview graphic element

Setting Up the Crumb Trail

I faked the logic to grab the path to the page you are on, because this is an interface and not a real course. It has no pages or sections. In a real course, you would probably build your crumb trail off of the current Framework and page titles.

  1. Insert a calculation before the main interface graphic. You will use this to give your crumb trail expression an initial value, so that it will have a value before it displays.

    Inserting a calculation to give the crumb trail expression an initial value

    Figure 29. Inserting a calculation to give the crumb trail expression an initial value

  2. To add your Crumb Trail to the interface, double-click the interface.png icon.

    Adding the crumb trail to the interface

    Figure 30. Adding the crumb trail to the interface

  3. Use your Text tool to type your crumb trail expression between curly brackets. I selected a dark blue color for my crumb trail. Make sure to check the "Update Displayed Variables" box in its Icon Properties dialog box.

Adding the Fake Buttons

To me, this is the most fun part. You don't see translucent buttons very much in Authorware, so they make a nice surprise (even if they are fake). The translucent buttons will be a series of Display Icons that are linked to the PNG files you created in part one. You'll be using the expression in the External Media Browser to create an Over state for the buttons.You'll begin by importing the PNG graphics.

  1. Position the Paste Hand below the Display Icon with the main interface, and click the Import Button. This will open the Import Which File? dialog box.
  2. Click the plus sign (+) at the lower right corner of the dialog box to open the Files to Import pane.

    Importing the files for the fake buttons

    Figure 31. Importing the files for the fake buttons

  3. Add the files for the normal state of each button. Make sure you check link to file checkbox.
  4. Once you've done that, click the Import button to import your selections.

    When you have finished, your flowline should look like figure 32 below.

    The finished flowline

    Figure 32. The finished flowline

    And your Presentation Window will look like figure 33 below.

    The finished presentation window

    Figure 33. The finished presentation window

    The graphics all imported to the same location, so they are all piled on top of one another.

  5. Double-click each of your new Displays and set the mode of the images inside to Alpha.
  6. Move the new graphics to the textured rectangle, so that your file looks like figure 34 below.

    Moving the new graphics to the textured rectangle

    Figure 34. Moving the new graphics to the textured rectangle

  7. This is starting to look like something usable, isn't it? Make sure you save your work. You're nearly done…this is no time to lose it.
  8. Use the Window Menu to open the External Media Browser, or use the shortcut Ctrl+Shift+X.

    The External Media Browser

    Figure 35. The External Media Browser

  9. Click one of the icons with external media, and change the type from Literal to Expression. The expression you see in the Expression field (FileLocation^"Finished_pngs\\Next"^Test(ObjectOverID=IconID, "_over", "")^".png") changes from Next.png to Next_over.png when the mouse is over the Next.png Icon.
  10. Make a similar change to all of the expressions.
  11. You'll have to change all three icons to Update Displayed Variables so that you can see the change on rollover. Select all three icons on the flow line and select Edit > Change properties to update this property for all three icons at once.
Updating the icon properties

Figure 36. Updating the icon properties

Now, all that remains is to add little touches like a label on the button, the placeholder for the course name, and masking the whole thing with MojoWinViz. I leave those to your ingenuity.



About the author

Amy Blankenship is a native of Gulfport, Mississippi. She graduated with a degree in Graphic Design and Photography from Mississippi State University. Her graphics background landed her a position on a team doing interactive Multimedia training for the Air Force, and the rest, as they say, is history.

The graphics aspect of that project began spilling over into performing the programming for the Authorware side. Though the job ended when the project did, Amy went on to do more Authorware work for several companies, primarily supporting military and government clients.

The government contracting market is not really the place to find lifetime employment, so after one too many layoffs, Amy started her own company, Magnolia Multimedia. As an independent contractor, she has had the chance to more fully explore the capabilities of both Authorware and her second favorite Macromedia product, Fireworks.